home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / editor / blksedtr.lha / BED / Rexx / SASC / SCMSG.bed < prev    next >
Text File  |  1996-05-06  |  929b  |  52 lines

  1. /*
  2. ** $VER: SCMSG.bed 1.0 (14.01.96)
  3. **
  4. ** Interface for using SC_MSG with BlacksEditor
  5. **
  6. **  SC_MSG options:
  7. **
  8. **  PortName:       BED
  9. **  EditCommand:    BED "%f"
  10. **  GotoFile:
  11. **  GoToLine:       ExecARexxMacro BED:Rexx/SASC/SCMSG.bed '%f' %l
  12. **  PubScreen:      Blacks_Editor
  13. **
  14. **  These options are set in the file "BED:Rexx/SASC/sc/SCMSG". Copy it in
  15. **  your ENVARC:sc directory.
  16. */
  17.  
  18. PARSE ARG "'" file "'" line
  19.  
  20. if SubStr(file,1,1) = '"' then DO
  21. PARSE VAR file '"' file '"'
  22. END
  23.  
  24. /* Extract the path from the current file's name */
  25.  
  26. dirend = LastPos('/', file)
  27. if dirend = 0
  28.     then dirend = Pos(':', file)
  29. if dirend ~= 0
  30.     then name = SubStr(file, dirend+1)
  31.     else name = file
  32.  
  33. OPTIONS RESULTS
  34.  
  35. ADDRESS BED
  36.  
  37. GetPort '"' || name || '"'
  38.  
  39. if RESULT ~= 'RESULT' THEN DO
  40.   ADDRESS VALUE RESULT
  41. END
  42. ELSE DO
  43.   'OpenDoc ' file
  44.   ADDRESS VALUE RESULT
  45. END
  46.  
  47. OPTIONS
  48.  
  49. 'Move LINE' line 0
  50. 'ActivateWindow FRONT'
  51. 'Screen2Front'
  52.